<html>
<head><meta charset="utf-8"><title>rust-analyzer with rustc · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.20with.20rustc.html">rust-analyzer with rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="196289559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%20with%20rustc/near/196289559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.20with.20rustc.html#196289559">(May 05 2020 at 10:17)</a>:</h4>
<p>I'm getting this when I try to run rust-analyzer on rustc now:</p>
<div class="codehilite"><pre><span></span><code>[ERROR rust_analyzer::main_loop] failed to load workspace: Failed to read Cargo metadata from Cargo.toml file /home/nmatsakis/versioned/rust-0/Cargo.toml: Failed to run `cargo metadata --manifest-path /home/nmatsakis/versioned/rust-0/Cargo.toml`: Error during execution of `cargo metadata`: error: failed to resolve patches for `https://github.com/rust-lang/cargo`

    Caused by:
      patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678

Warning: can&#39;t set `version = Two`, unstable features are only available in nightly channel.
Warning: can&#39;t set `ignore = IgnoreList { path_set: {&quot;src/doc/edition-guide&quot;, &quot;src/doc/reference&quot;, &quot;src/doc/rust-by-example&quot;, &quot;/vendor/&quot;, &quot;src/libstd/sys/cloudabi/abi/cloudabi.rs&quot;, &quot;src/stdarch&quot;, &quot;src/tools/cargo&quot;, &quot;src/doc/book&quot;, &quot;src/doc/embedded-book&quot;, &quot;src/llvm-project&quot;, &quot;src/tools/rustfmt&quot;, &quot;src/doc/rustc-dev-guide&quot;, &quot;build&quot;, &quot;src/tools/miri&quot;, &quot;src/tools/rust-installer&quot;, &quot;src/doc/nomicon&quot;, &quot;src/test&quot;, &quot;src/tools/clippy&quot;, &quot;src/tools/rls&quot;}, rustfmt_toml_path: &quot;&quot; }`, unstable features are only available in nightly channel.
Warning: can&#39;t set `version = Two`, unstable features are only available in nightly channel.
Warning: can&#39;t set `ignore = IgnoreList { path_set: {&quot;/vendor/&quot;, &quot;src/llvm-project&quot;, &quot;src/doc/book&quot;, &quot;build&quot;, &quot;src/tools/rustfmt&quot;, &quot;src/tools/rls&quot;, &quot;src/libstd/sys/cloudabi/abi/cloudabi.rs&quot;, &quot;src/stdarch&quot;, &quot;src/doc/rustc-dev-guide&quot;, &quot;src/doc/embedded-book&quot;, &quot;src/tools/clippy&quot;, &quot;src/doc/rust-by-example&quot;, &quot;src/tools/cargo&quot;, &quot;src/doc/edition-guide&quot;, &quot;src/tools/rust-installer&quot;, &quot;src/test&quot;, &quot;src/tools/miri&quot;, &quot;src/doc/reference&quot;, &quot;src/doc/nomicon&quot;}, rustfmt_toml_path: &quot;&quot; }`, unstable features are only available in nightly channel.
</code></pre></div>


<p>Any idea what's going on?</p>



<a name="196289780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%20with%20rustc/near/196289780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.20with.20rustc.html#196289780">(May 05 2020 at 10:21)</a>:</h4>
<p>Have you set a rustup nightly override for the project dir?</p>



<a name="196289801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%20with%20rustc/near/196289801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.20with.20rustc.html#196289801">(May 05 2020 at 10:21)</a>:</h4>
<p>Seems not-specific to rust-analyzer, <code>cargo metadata --manifest-path /home/nmatsakis/versioned/rust-0/Cargo.toml</code> should fail fromt he command line as well I think</p>



<a name="196289896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%20with%20rustc/near/196289896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.20with.20rustc.html#196289896">(May 05 2020 at 10:22)</a>:</h4>
<p>I bet that commenting out this:</p>
<p><a href="https://github.com/rust-lang/rust/blob/de27cd7649e4182c63c770d18a561bda0d88cfc6/Cargo.toml#L44-L50" title="https://github.com/rust-lang/rust/blob/de27cd7649e4182c63c770d18a561bda0d88cfc6/Cargo.toml#L44-L50">https://github.com/rust-lang/rust/blob/de27cd7649e4182c63c770d18a561bda0d88cfc6/Cargo.toml#L44-L50</a></p>
<p>should "fix"</p>



<a name="196289944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%20with%20rustc/near/196289944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.20with.20rustc.html#196289944">(May 05 2020 at 10:22)</a>:</h4>
<p>Not sure what's the underling issue, but my two guesses:</p>
<ul>
<li><code>cargo</code> submodule is somehow borked</li>
<li>perhpaps there's major version mismatch between cargo submodule and cargo in lockfile</li>
</ul>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>